package me.keiwu.user.dao;

import me.keiwu.user.domain.UserDeliveryAddress;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

public interface UserDeliveryAddressDao extends JpaRepository<UserDeliveryAddress, Long>, JpaSpecificationExecutor<UserDeliveryAddress> {

    @Query(value = "select count(*) from user_delivery_address where user_id=?1 and is_del=0", nativeQuery = true)
    int fillCountForUser(Long userId);
}
